package com.pine.app.module.security.oauth.provider.token.converter;

import com.pine.app.module.security.core.Authentication;
import com.pine.app.module.security.core.userdetails.UserDetails;

import java.util.Map;

/**
 * @author xiaoyuan
 * @create 2020/3/10
 **/
public interface UserAuthenticationConverter {


    String AUTHORITIES = "authorities";
    String USERNAME = "user_name";

    Map<String, ?> convertUserAuthentication(Authentication authentication);

    UserDetails extractAuthentication(Map<String, ?> map);
}
